package com.MaterialHeap.material

import com.MaterialHeap.location.City
import com.MaterialHeap.location.Province

import com.MaterialHeap.type.MaterialType
import com.MaterialHeap.type.GradeType

class Material {

    String name

    Province originProvince

    City originCity

    BigDecimal price

    String size

    GradeType gradeType

    MaterialType materialType

    String purpose

    String description

    static constraints = {
        name(unique: true)
        originProvince(nullable: true)
        originCity(nullable: true)
    }
}
